package net.risesoft.y9.pubsub.event;

import org.springframework.context.ApplicationEvent;

/**
 * 组织事件
 * 
 * @author dingzhaojun
 * @author qinman
 * @author mengjuhua
 * @date 2022/2/10
 */
public class Y9EventOrg extends ApplicationEvent {
    private static final long serialVersionUID = 5693234105948292780L;

    private Object orgObj;
    private String eventType;
    private String eventTarget;
    private String tenantId;

    public Y9EventOrg() {
        super("event source");
    }

    public Y9EventOrg(Object orgObj, String eventType, String eventTarget, String tenantId) {
        super("event source");
        this.orgObj = orgObj;
        this.eventType = eventType;
        this.eventTarget = eventTarget;
        this.tenantId = tenantId;
    }

    public String getEventTarget() {
        return eventTarget;
    }

    public String getEventType() {
        return eventType;
    }

    public Object getOrgObj() {
        return orgObj;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setEventTarget(String eventTarget) {
        this.eventTarget = eventTarget;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public void setOrgObj(Object orgObj) {
        this.orgObj = orgObj;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    public String toString() {
        return "Y9OrgEvent [orgObj=" + orgObj + ", eventType=" + eventType + ", eventTarget=" + eventTarget + ", tenantId=" + tenantId + "]";
    }

}